package StudyCode.summary.aclfile;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ReadBinaryFileInputStream {
	public static void main(String[] arguments) {
		try (FileInputStream file = new FileInputStream("E:/Copy/1.txt")) {
			boolean eof = false;
			int count = 0;
			while (!eof) {
				int input = file.read();
				System.out.print(input + " ");
				if (input == -1)
					eof = true;
				else
					count++;
			}
			file.close();
			System.out.println("\n字节数: " + count);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
